package commands;

import bot.CommandBot;


public class Time implements Command {

	public String getCommandName() {
		return "time";
	}

	public boolean execCommand(String channel, String sender, String login,
			String hostname, String message, CommandBot bot) {
		if (message.equals("")) {
			String time = new java.util.Date().toString();
			bot.sendMessage(channel, sender + ": The time is now " + time, true);
			return true;
		}
		return false;
	}

	@Override
	public boolean execCommand(String sender, String login, String hostname,
			String message, CommandBot bot) {
		if (message.equals("")) {
			String time = new java.util.Date().toString();
			bot.sendMessage(sender, "The time is now " + time, true);
			return true;
		}
		return false;

	}
}
